#include<iostream>
#include<string>
#include<algorithm>


using namespace std;

int a[200000]={0};
int b[200001]={0};


int main(){
    int n=0;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a[i];
        b[a[i]]++;
    }
    int sum=n;
    sort(a,a+n);
    for(int i=a[n-1];i>=0;i--){
        if(b[i]!=0)
        sum=sum-b[i]+1;
    }
    cout<<sum;
    return 0;
}
